<html>
    <head>
        <meta http-equiv="Content-type" content="text/html; charset=utf-8">
        <title>Mgl Dev Cycle</title>

<!--
I got the thems link on this page:
   http://www.devcurry.com/2010/05/latest-jquery-and-jquery-ui-theme-links.html
        <link rel="stylesheet" class="ui-theme" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css"> 
        <link rel="stylesheet" class="ui-theme" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/themes/black-tie/jquery-ui.css">
        <link rel="Stylesheet" class="ui-theme" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/themes/overcast/jquery-ui.css">    
        <link rel="Stylesheet" class="ui-theme" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/themes/blitzer/jquery-ui.css">    
        <link rel="stylesheet" class="ui-theme" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/themes/dot-luv/jquery-ui.css">
        <link rel="stylesheet" class="ui-theme" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/themes/redmond/jquery-ui.css">
-->
        <link rel="stylesheet" class="ui-theme" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/themes/vader/jquery-ui.css">

        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.js"></script>
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.js"></script>


        <script type="text/javascript" chaset=utf-8"">
        jQuery(function($) {
            {% if THEMESWITCH %}
                        $('#switcher').themeswitcher();
            {% endif %}
            
            $(".cycle-accordion").accordion({
                active: -1, collapsible: true, header: "h3", autoHeight: false, fillSpace: false,
            });
            
            $(".cycle-tabs").tabs({
                collapsible: false, active:1, 
                //event: "mouseover",
                ajaxOptions: {
                    error: function( xhr, status, index, anchor ) {
                        $( anchor.hash ).html( "Couldn't load this tab. Please contact the R&D." );
                    }
                }
            });
            
            $( ".admin-edit-cycle" ).button({
                icons: {
                    primary: "ui-icon-pencil"
                }
            });
        
        });
        </script>

    </head>
    <body>

        {% if THEMESWITCH %}
            <script type="text/javascript"
              src="http://jqueryui.com/themeroller/themeswitchertool/">
            </script>
            <hr><div id="switcher" align=right></div><hr>
        {% endif %}

        <div class="cycle-accordion">
            {% for cycle in cycles %}
                <h3><a href="#">{{ cycle }}</a></h3>
                <div id={{cycle.pk}} class="cycle-tabs" style="padding:10px;">
                    <ul>
                        <li><a href="#tabs-comments-id{{cycle.pk}}">Comments</a></li>
                        <li><a href="Cycles/{{cycle.pk}}/Components/Tasks">Tasks</a></li>
                        <li><a href="Cycles/{{cycle.pk}}/Components/Summary">Summary</a></li>
                    </ul>
                    <div id="tabs-comments-id{{cycle.pk}}">
                        {{ cycle.comments }}<br>
                        <a class="admin-edit-cycle" href="/admin/TasK/cycle/{{cycle.pk}}/" target="admin_win">Edit</a>
                    </div>
<!--
                    <div id="tabs-tasks-id{{cycle.pk}}">
                        <ul>
                            {% for tache in cycle.tache_set.all %}
                                <li>{{tache.name}}</a></li>
                            {% empty %}
                                <li>Sorry, no Tache in this list!</li>
                            {% endfor %}
                        </ul>
                    </div>
                    <div id="tabs-summary-id{{cycle.pk}}">
                        bla<br>
                        blah...
                    </div>
-->
                </div>
            {% endfor %}
        </div>

    </body>
</html>
